package com.sun.designPattern.proxy.impl.cglib;

import java.lang.reflect.Method;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

public class CglibProxy implements MethodInterceptor {

	@Override
	public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
		System.out.println("++++++before " + proxy.getSuperName() + "++++++");
		System.out.println(method.getName());
		Object o1 = proxy.invokeSuper(obj, args);
		System.out.println("++++++before " + proxy.getSuperName() + "++++++");
		return o1;
	}

}
